import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 用户管理查询
export const usersQuery = (parms:any) => {
    return service.post<any,any>(`/sdUser/getUser`,parms)
}

// 职位查询
export const postQuery = () => {
    return service.get<any,any>('/sdUser/getPosition')
}

// 派工部门查询
export const DispatchDepartment = () => {
    return service.get<any,any>(`/sdUser/getPcCuttingDispatchDept`)
}

// 添加用户
export const addUsers = (parms:any) => {
    return LoginWork.post<any,any>(`/sdUser/addUser`,parms)
}

// 删除用户
export const deleteUser = (userId:any) => {
    return LoginWork.post<any,any>(`/sdUser/delUser?userId=${userId}`)
}

// 重置密码
export const resetPassword = (userId:any) => {
    return LoginWork.put<any,any>(`/sdUser/reset?userId=${userId}`)
}

// 修改
export const midifne = (parms:any) => {
    return LoginWork.put<any,any>(`/sdUser/updateUser`,parms)
}